Complete list patterns and stop offering flags before a dash - #41
Conversation
| be ``%``, so each level offers its wildcard next to the concrete names. | ||
| """ | ||
| prefix = _peer_lowered(prefix) | ||
| if prefix.count(".") < 2: |
There was a problem hiding this comment.
Does this cover this case? hsfei.% takes the daemon path and asks "which daemon starts with the text hsfei.%?" I think the current if condition is doing a startswith check so we aren't able to autocomplete when attempting to see the possible daemons associated with the group hsfei
There was a problem hiding this comment.
This is only the TAB completer, not the list command, which already handles hsfei.% on main.
Typing hsfei. and pressing TAB offers hsfei.% plus every daemon in the group, so the daemons are reachable one keystroke earlier. TAB after a typed % returns nothing on purpose: the shell replaces the whole word, so offering hsfei.adc there would delete the %.
| ) | ||
|
|
||
|
|
||
| def _peer_lowered(prefix: str) -> str: |
There was a problem hiding this comment.
In address_candidates you also do this check. Probably should have address_candidates also use this helper function
There was a problem hiding this comment.
Done, address_candidates now calls it and drops its own lower().
--flagalongside addresses; options complete once you type-libby listgets its own completer: a daemon can stand alone there, and each level offers its%form, solibby list <TAB>starts at%.%andhsfei.%, andhsfei.%.<TAB>offers the keywords across the group